const path = require('path');
const { app, BrowserWindow } = require('electron');
function createWindow() {
  const win = new BrowserWindow({
    width: 1200,
    height: 800,
    // frame: false, // 去掉标题栏
    webPreferences: {
      nodeIntegration: true,
      contextIsolation: false
    }
  });
  // 使用 path.join 保证路径正确
  win.setMenu(null); // 去掉菜单栏
  win.loadFile(path.join(__dirname, 'dist', 'index.html'));
}
app.whenReady().then(createWindow);